package com.aggron.dao;

import com.aggron.entity.SysAcl;
import com.aggron.params.AclParams;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author liuhuan
 * @since 2018-06-02
 */
public interface SysAclMapper extends BaseMapper<SysAcl> {

    /**
     * 根据aclIdList查询sysAclList
     * @param aclIdList
     * @return
     */
    List<SysAcl> getSysAclListByAclIdList(@Param("aclIdList") List<Integer> aclIdList);

    /**
     * 当前aclModuleX下是否有权限点
     * @param aclModuleId
     * @return
     */
    int countByAclModuleId(Integer aclModuleId);

    /**
     * 分页查询权限点
     * @param page
     * @param aclParams
     * @return
     */
    List<Map<String,Object>> listAcl(Page page, AclParams aclParams);

    /**
     * 查询总数
     * @param aclParams
     * @return
     */
    int countAcl(AclParams aclParams);
}
